<?php 
// no direct access 
defined( '_JEXEC' ) or die( 'Restricted access' );
  
define( 'YOURBASEPATH', dirname(__FILE__) );

$leftColumnWidth			= $this->params->get("leftColumnWidth", 20);
$showLeftColumn = $this->countModules('left') > 0;
$leftColumnWidth *= $showLeftColumn;

$rightColumnWidth			= $this->params->get("rightColumnWidth", 20);
$showRightColumn = $this->countModules('right') > 0;
$showRightColumn &= JRequest::getCmd('layout') != 'form';
$showRightColumn &= JRequest::getCmd('task') != 'edit';
$rightColumnWidth *= $showRightColumn;

if (($leftColumnWidth + $rightColumnWidth) > 80)
{
  $rightColumnWidth = 20;
}
if (($leftColumnWidth + $rightColumnWidth) > 80)
{
  $leftColumnWidth = 20;
}

define( 'ds', 	'/' );

$contentWidth = 100 - $leftColumnWidth - $rightColumnWidth;
$templatePath = 'templates' . ds . $this->template . ds;
$cssPath = $templatePath . 'css' . ds;
$imagePath = $templatePath . 'image' . ds;
$jsPath = $templatePath . 'js' . ds;

$document =& JFactory::getDocument();

//JHTML::script('mootools-uncompressed.js'); //$document->addScript('/media/system/js/mootools.js');
JHTML::script('wb_first.js', $jsPath);
JHTML::script('reflection.js', $jsPath);

JHTML::stylesheet('general.css', 'templates/system/css/');
JHTML::stylesheet('template.css', $cssPath);
JHTML::stylesheet('wb_menu.css', $cssPath);
JHTML::stylesheet('wb_module_menu.css', $cssPath);
//JHTML::stylesheet('mn_menu.css', $cssPath);
JHTML::stylesheet('menu.css', 'templates/wb_first/menu/css/');

$home = JURI::root();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"\>

<html xmlns="http://www.w3.org/1999/xhtml" 
      xml:lang="<?php echo $this->language; ?>" 
      lang="<?php echo $this->language; ?>" 
>
  <head>
    <link rel="shortcut icon" href="/templates/<?php echo $this->template ?>/images/favicon.ico" />
    <jdoc:include type="head" />
    <?php require(YOURBASEPATH . DS. "phpVars.php"); ?>
  </head>

  <body id="outer" class="<?php echo $this->params->get('template_width');?> <?php echo $this->params->get('background_style'); ?>">
    <div id="wrap">
      <?php require(YOURBASEPATH . DS. "wbColorChooser.php"); ?>
      
      <div id="upper">
        <div class="inside">
          <a id="logo" href="<?php echo $home; ?>" >
            <img id="logoimg" src="<?php echo $templatePath ?>/images/wimbekker.png"/ alt="home" onload="this.reflect();">
          </a>
          <div id="header">
            <jdoc:include type="modules" name="header" style="xhtml" />
          </div>
          <div style="clear:both;"></div>
        </div>
      </div>

      <div id="top">
        <?php 
        //<div class="inside">
        ?>
          <jdoc:include type="modules" name="top" style="xhtml" />
        <?php 
        //</div>
         ?>
      </div>
    
      <?php if($showLeftColumn) : ?>
      <div id="left" style="clear:both" class="<?php echo $this->params->get("columnLayout", "left-right"); ?>" >
        <div class="inside">
          <jdoc:include type="modules" name="left" style="xhtml" />
        </div>
      </div>
      <?php endif; ?>
      
      <div id="content" class="<?php echo $this->params->get("columnLayout", "left-right"); ?>" > 
        <div class="inside">
          <jdoc:include type="module" name="breadcrumbs" style="none" />
          <jdoc:include type="message" />
          <jdoc:include type="component" style="xhtml" />
          <div class="user1">
            <div class="user2"><jdoc:include type="modules" name="user1" /></div>
            <div class="user2"><jdoc:include type="modules" name="user2" /></div>
            <div class="clr"></div>
          </div>
          <div class="user1">
            <div class="user1"><jdoc:include type="modules" name="user3" /></div>
          </div>
          <div class="user1">
            <div class="user2"><jdoc:include type="modules" name="user4" /></div>
            <div class="user2"><jdoc:include type="modules" name="user5" /></div>
            <div class="clr"></div>
          </div>         
        </div>
      </div>
      <?php if ($showRightColumn) : ?>
      <div id="right" class="<?php echo $this->params->get("columnLayout", "left-right"); ?>" >
        <div class="inside">
          <jdoc:include type="modules" name="right" style="xhtml" />
        </div>
      </div>
      <?php endif; ?>
      
      <div id="footer">
        <div class="inside">
          <jdoc:include type="modules" name="footer" style="xhtml" /> 
        </div>
      </div>      
    </div>
  <!--end of wrap-->
  </body>  
</html>